package Thread;

public class Demo2 {
    //实现Runnable接口，重写run方法：
    public static class MyRunnable implements Runnable {
        @Override
        public void run() {
            System.out.println("线程运行中...");
        }
    }

    public static void main(String[] args) {
        Thread thread = new Thread(new MyRunnable());
        thread.start();
    }
}
